package chapter2.No2_3_volatile关键字.a关键字volatile与死循环.demo3;

/**
 * Created by Administrator on 2016/11/15.
 */
public class Main {
    public static void main(String[] args) throws InterruptedException {
        ServiceClass sc = new ServiceClass();
        new Thread(sc).start();

        Thread.sleep(2000);
        System.out.println("我要开始停止线程了："+Thread.currentThread().getName());
        sc.setStop(false);
    }
}
